package vista;
import java.awt.Color;
import java.awt.event.ActionListener;

import javax.swing.BorderFactory;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.JTextField;

import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class FormCliente extends javax.swing.JFrame {
	private JPanel jPanel1;
	private JLabel jLabel3;
	private JLabel jLabel4;
	private JLabel jLabel5;
	private JSeparator jSeparator3;
	private JSeparator jSeparator2;
	private JLabel jLabel7;
	private JSeparator jSeparator1;
	private JButton bntBuscar;
	private JTextField Textemail;
	private JTextField TextTelefono;
	private JTextField TextDireccion;
	private JTextField TextApellido;
	private JTextField TextRif;
	private JTextField TextNombre;
	private JLabel jLabel6;
	private JLabel jLabel2;
	private JLabel jLabel1;
	private JButton bntGuardar;
	private JButton bntEliminar;
	private JButton bntCancelar;
	private JButton bntSalir;
	private JPanel jPanel2;

	/**
	* Auto-generated main method to display this JFrame
	*/
	
	public FormCliente() {
		super();
		initGUI();
		getContentPane().setBackground(Color.white);
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			getContentPane().setLayout(null);
			getContentPane().setBackground(Color.white);
			this.setTitle("Formulario del Cliente");
			{
				jPanel1 = new JPanel();
				getContentPane().add(jPanel1);
				jPanel1.setBounds(73, 80, 347, 255);
				jPanel1.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
				jPanel1.setLayout(null);
				{
					jLabel1 = new JLabel();
					jPanel1.add(jLabel1);
					jLabel1.setText("Nombre");
					jLabel1.setBounds(21, 69, 66, 22);
					jLabel1.setFont(new java.awt.Font("Dialog",0,14));
				}
				{
					jLabel2 = new JLabel();
					jPanel1.add(jLabel2);
					jLabel2.setText("Apellido");
					jLabel2.setBounds(21, 105, 74, 22);
					jLabel2.setFont(new java.awt.Font("Dialog",0,14));
				}
				{
					jLabel3 = new JLabel();
					jPanel1.add(jLabel3);
					jLabel3.setText("Rif");
					jLabel3.setBounds(30, 20, 45, 19);
					jLabel3.setFont(new java.awt.Font("Dialog",0,14));
				}
				{
					jLabel4 = new JLabel();
					jPanel1.add(jLabel4);
					jLabel4.setText("Telefono");
					jLabel4.setBounds(21, 176, 74, 22);
					jLabel4.setFont(new java.awt.Font("Dialog",0,14));
				}
				{
					jLabel5 = new JLabel();
					jPanel1.add(jLabel5);
					jLabel5.setText("DIreccion");
					jLabel5.setBounds(21, 139, 80, 22);
					jLabel5.setFont(new java.awt.Font("Dialog",0,14));
				}
				{
					jLabel6 = new JLabel();
					jPanel1.add(jLabel6);
					jLabel6.setText("e-mail");
					jLabel6.setBounds(21, 212, 66, 22);
					jLabel6.setFont(new java.awt.Font("Dialog",0,14));
				}
				{
					TextNombre = new JTextField();
					jPanel1.add(TextNombre);
					TextNombre.setBounds(100, 66, 129, 24);
				}
				{
					TextRif = new JTextField();
					jPanel1.add(TextRif);
					TextRif.setBounds(100, 19, 129, 24);
				}
				{
					TextApellido = new JTextField();
					jPanel1.add(TextApellido);
					TextApellido.setBounds(100, 103, 129, 24);
				}
				{
					TextDireccion = new JTextField();
					jPanel1.add(TextDireccion);
					TextDireccion.setBounds(100, 138, 221, 24);
				}
				{
					TextTelefono = new JTextField();
					jPanel1.add(TextTelefono);
					TextTelefono.setBounds(100, 173, 129, 24);
				}
				{
					Textemail = new JTextField();
					jPanel1.add(Textemail);
					Textemail.setBounds(100, 209, 129, 24);
				}
				{
					bntBuscar = new JButton();
					jPanel1.add(bntBuscar);
					bntBuscar.setText("B");
					bntBuscar.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagenes/buscar1.png")));
					bntBuscar.setBounds(248, 8, 67, 40);
				}
				{
					jSeparator1 = new JSeparator();
					jPanel1.add(jSeparator1);
					jSeparator1.setBounds(14, 53, 318, 4);
				}
			}
			{
				jPanel2 = new JPanel();
				getContentPane().add(jPanel2);
				jPanel2.setBounds(19, 347, 449, 55);
				jPanel2.setLayout(null);
				jPanel2.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
				{
					bntSalir = new JButton();
					jPanel2.add(bntSalir);
					bntSalir.setText("S");
					bntSalir.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagenes/salir1.png")));
					bntSalir.setBounds(376, 8, 61, 38);
				}
				{
					bntCancelar = new JButton();
					jPanel2.add(bntCancelar);
					bntCancelar.setText("Cancelar");
					bntCancelar.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagenes/eliminar.png")));
					bntCancelar.setFont(new java.awt.Font("Dialog",0,11));
					bntCancelar.setBounds(252, 9, 114, 39);
				}
				{
					bntEliminar = new JButton();
					jPanel2.add(bntEliminar);
					bntEliminar.setText("Eliminar");
					bntEliminar.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagenes/eliminar1.png")));
					bntEliminar.setFont(new java.awt.Font("Dialog",0,11));
					bntEliminar.setBounds(130, 9, 112, 39);
				}
				{
					bntGuardar = new JButton();
					jPanel2.add(bntGuardar);
					bntGuardar.setText("Guardar");
					bntGuardar.setIcon(new ImageIcon(getClass().getClassLoader().getResource("imagenes/aceptar.png")));
					bntGuardar.setFont(new java.awt.Font("Dialog",0,11));
					bntGuardar.setBounds(9, 9, 110, 39);
				}
			}
			{
				jLabel7 = new JLabel();
				getContentPane().add(jLabel7);
				getContentPane().add(jLabel7).setBackground(Color.white);
				jLabel7.setText(" Datos del Cliente");
				jLabel7.setBounds(87, 22, 294, 36);
				jLabel7.setOpaque(true);
				jLabel7.setFont(new java.awt.Font("Purisa",1,26));
			}
			{
				jSeparator2 = new JSeparator();
				getContentPane().add(jSeparator2);
				jSeparator2.setBounds(85, 59, 301, 8);
				jSeparator2.setEnabled(false);
			}
			{
				jSeparator3 = new JSeparator();
				getContentPane().add(jSeparator3);
				jSeparator3.setBounds(85, 20, 301, 8);
			}
			pack();
			this.setSize(495, 448);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

	
	public void addlistener(ActionListener actionListener)
	{
		this.bntBuscar.addActionListener(actionListener);
		this.bntGuardar.addActionListener(actionListener);
		this.bntEliminar.addActionListener(actionListener);
		this.bntCancelar.addActionListener(actionListener);
		this.bntSalir.addActionListener(actionListener);
		
	}
	
	public void mostrarMensaje(String mensaje) {
	    JOptionPane.showMessageDialog(this, mensaje);
	 }

	public void SetTextNombre(String str)
	{
		TextNombre.setText(str);
	}
	public JTextField GetTextNombre()
	{
		return TextNombre; 
	}
	
	public void SetTextRif(String str)
	{
		TextRif.setText(str);
	}
	public JTextField GetTextRif()
	{
		return TextRif;
	}
	public void SetTextApellido(String srt)
	{
		TextApellido.setText(srt);
	}
    public JTextField GetTextApellido()
    {
    	return TextApellido;
    }
	public void  SetTextDireccion(String srt)
	{
		 TextDireccion.setText(srt);
	}
   public JTextField GetTextDireccion()
   {
	   return  TextDireccion;  
   }
   public void  SetTextTelefono (String srt)
	{
		 TextTelefono.setText(srt);
	}
  public JTextField GetTextTelefono()
  {
	  return TextTelefono;
  }
 
  public void  SetTextemail(String srt)
	{
		Textemail.setText(srt);
	}
public JTextField GetTextemail()
{
	  return 	Textemail;
}

public void EnabledBntEliminar(boolean x)
{
	bntEliminar.setEnabled(x);
}
public void EnabledbntBuscar(boolean x)
{
	bntBuscar.setEnabled(x);
}
public void EnabledbntGuardar(boolean x)
{
	bntGuardar.setEnabled(x);
}
public void EnabledbntCancelar(boolean x)
{
	bntCancelar.setEnabled(x);
}

}

